
/*
import React, { PureComponent } from 'react'
import { StyleSheet, View, Text, Image, TouchableOpacity, TouchableHighlight } from 'react-native'
import SQLite from '../../common/DataBase'

import {BoxShadow} from 'react-native-shadow'

let sqlite = new SQLite()
let db;
class TestScene extends PureComponent<{}>{

    //组件要被从界面上移除的时候
    componentWillUnmount = () => {
        //关闭数据库
        sqlite.close(db)
    }

    getUserFromLocal = () => {
        if (!db) {
            db = sqlite.open()
        }
        db.transaction((tx) => {
            tx.executeSql("select * from user", [], (tx, results) => {
                console.log(results.rows.length)
                let user = results.rows.item(0);
                alert(JSON.stringify(user))
                return user;
            });
        }, (error) => {
            alert(error);
            console.log(error);
        });
    }

    onPressAddUser = () => {
        let user = {};
        user.id = "111";
        sqlite.login(user);
    }

    render() {

        const shadowOpt = {
			width:160,
			height:170,
			color:"#000",
			border:2,
			radius:3,
			opacity:0.2,
			x:0,
			y:3,
			style:{marginVertical:5}
		}
        return (
            <View >
                <TouchableOpacity onPress={() => this.onPressAddUser()}>
                    <Text>添加用户id</Text>
                </TouchableOpacity>
                <TouchableOpacity onPress={() => this.getUserFromLocal()}>
                    <Text>查询用户id</Text>
                </TouchableOpacity>
                <BoxShadow setting={shadowOpt}>
				<TouchableHighlight style={{
					position:"relative",
					width: 160,
					height: 170,
					backgroundColor: "#fff",
					borderRadius:3,
					// marginVertical:5,
                    overflow:"hidden"}}
                    onPress={()=>
                    alert("ahaha")}>
					<Text>hahahahh </Text>
				</TouchableHighlight>
			</BoxShadow>


            </View>
        );
    }
}
const styles = StyleSheet.create({
})
export default TestScene
*/



//姬祥测试代码
/**
 * Copyright (c) 2017-present, Liu Jinyong
 * All rights reserved.
 *
 * https://github.com/huanxsd/MeiTuan  
 * @flow
 */


import React, { PureComponent } from 'react'
import { FlatList,Modal, ImageBackground, View, Text, StyleSheet, ScrollView, TouchableOpacity, ListView, Image } from 'react-native'
import ScrollableTabView, { DefaultTabBar } from 'react-native-scrollable-tab-view'

import { Heading2, Title, Price } from '../../widget/Text'
import { color, Button, NavigationItem, SpacingView } from '../../widget'
import { screen, system } from '../../common'
import NewPersonDiscountCoupon from '../Home/NewPersonDiscountCoupon'
import GoGroupPurchase from '../Home/tab/grouppurchase/GoGroupPurchase'
import SeeMoreGroupPurchase from '../Home/tab/grouppurchase/SeeMoreGroupPurchase'
import DiscountCouponIssueMadol from '../Home/DiscountCouponIssue'

type Props = {
    //navigation: any,
}
type State = {
    showNewPersonDiscountCouponMadol: boolean,
    showGoGroupPurchaseMadol:boolean,
    showSeeMoreGroupPurchaseMadol:boolean,
    showDiscountCouponIssueMadol:boolean,
}

class TestScene extends PureComponent<Props, State> {

    constructor(props: Object) {
        super(props)

        this.state = {
            showNewPersonDiscountCouponMadol: false,
            showGoGroupPurchaseMadol:false,
            showSeeMoreGroupPurchaseMadol:false,
            showDiscountCouponIssueMadol:false,
        }
    }
    //控制每次执行都发送true（初始传送的值为false）
    _setNewPersonDiscountCouponVisible() {
        let isShow = this.state.showNewPersonDiscountCouponMadol;
        this.setState({
            showNewPersonDiscountCouponMadol: !isShow,
        })
    }
    //控制每次执行都发送true（初始传送的值为false）
    _setGoGroupPurchaseModalVisible() {
        let isShow = this.state.showGoGroupPurchaseMadol;
        this.setState({
            showGoGroupPurchaseMadol: !isShow,
        })
    }

    _setSeeMoreGroupPurchaseMadolVisible(){
        let isShow = this.state.showSeeMoreGroupPurchaseMadol;
        this.setState({
            showSeeMoreGroupPurchaseMadol: !isShow,
        })
    }

    _setDiscountCouponIssueMadolVisible(){
        let isShow = this.state.showDiscountCouponIssueMadol;
        this.setState({
            showDiscountCouponIssueMadol: !isShow,
        })
    }
    render() {

        return (

            <View style={styles.container}>
                <TouchableOpacity
                    onPress={() => {

                        this._setNewPersonDiscountCouponVisible()

                    }}>
                    <Text>showNewPersonDiscountCouponMadol</Text>
                </TouchableOpacity>
                <TouchableOpacity
                    onPress={() => {

                        this._setGoGroupPurchaseModalVisible()

                    }}>
                    <Text>showGoGroupPurchaseMadol</Text>
                </TouchableOpacity>
                <TouchableOpacity
                    onPress={() => {

                        this._setSeeMoreGroupPurchaseMadolVisible()

                    }}>
                    <Text>showSeeMoreGroupPurchaseMadol</Text>
                </TouchableOpacity>
                <TouchableOpacity
                    onPress={() => {

                        this._setDiscountCouponIssueMadolVisible()

                    }}>
                    <Text>showDiscountCouponIssueMadol</Text>
                </TouchableOpacity>
                <NewPersonDiscountCoupon show={this.state.showNewPersonDiscountCouponMadol}/>
                <GoGroupPurchase show={this.state.showGoGroupPurchaseMadol}/>
                <SeeMoreGroupPurchase show={this.state.showSeeMoreGroupPurchaseMadol}/>
                <DiscountCouponIssueMadol show={this.state.showDiscountCouponIssueMadol}/>
            </View>
        )
    }
}

const styles = StyleSheet.create({
    container:{
        backgroundColor: '#C0C0C0',
        flex: 1,
        
    }
})


export default TestScene
